/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_LIB_BSTRINGLIST_H_
#define BAREOS_LIB_BSTRINGLIST_H_

#include "include/bareos.h"

class BStringList : public std::vector<std::string> {
 public:
  BStringList();
  BStringList(const std::string& string_to_split, char separator);
  BStringList(const std::string& string_to_split, std::string string_separator);
  BStringList& operator=(const BStringList& rhs);
  BStringList(const BStringList& other);
  BStringList& operator<<(const std::string& rhs);
  BStringList& operator<<(const int& rhs);
  BStringList& operator<<(const char* rhs);
  BStringList& operator<<(const std::vector<std::string>& vec);
  std::string Join(char separator) const;
  std::string JoinReadable() const;
  std::string Join() const;
  void Append(const std::vector<std::string>& vec);
  void Append(char character);
  void Append(const char* str);
  void PopFront();

 private:
  std::string Join(const char* separator) const;
};

#endif /* BAREOS_LIB_BSTRINGLIST_H_ */
